#include <iostream>
#include <cmath>
using namespace std;
enum te {
    _circle,
    _square,
    _rectangle,
    _triangle
};
struct gs{
    enum te e;
    const char *name;
    union {
        double one;
        double three[3];
    };
} k;
double f_circle(struct gs &gs)
{
    cout << "Please input the radius for a side of your circle: ";
    cin >> gs.one;

    if (gs.one > 0)
        return M_PI * gs.one * gs.one;
    return 0;
}
double f_triangle(struct gs &gs)
{
    cout << "Please input the lengths of three sides of a triangle: ";
    cin >> gs.three[0] >> gs.three[1] >> gs.three[2];
    double p = (gs.three[0]+gs.three[1]+gs.three[2])/2;
    if (gs.three[0] > 0 and gs.three[1] > 0 and gs.three[2] > 0)
        return sqrt(p*(p-gs.three[0])*(p-gs.three[1])*(p-gs.three[2]));
    return 0;
}

int main(){
    double a,b,c;

    a=3;b=4;c=5;
    k = {f_triangle(a, b, c) };
}
